<template>
  <div id="listenmain">
    <ul>
      <li v-for="(value,key,index) in listenbook" :key="index">
        <div @touchstart="golistenmain">
          <img :src="value.img" alt />
          <div class="playbtn">
            <img src="@/assets/书架/u2385.png" alt />
          </div>
        </div>
        <div>
          <p @touchstart="golistenmain">{{value.name}}</p>
          <p @touchstart="golistenmain">{{value.author}}</p>
        </div>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  data() {
    return {
      listenbook: {
        book1: {
          name: "从零开始的女权主义",
          author: "曹雪芹",
          img: require("@/assets/书架/u1727.png")
        }
      }
    };
  },
  methods:{
    golistenmain(){
        this.$router.push({
            path:'/listeningbook'
        },()=>{})
    }
  }
};
</script>

<style lang="less" scoped>
#listenmain {
  ul {
    list-style: none;
    li {
      display: flex;
      div {
        &:first-of-type {
          position: relative;
          img {
            border-radius: .5rem;
          }
         .playbtn{
            position: absolute;
            right: 0;
            bottom: .5rem;
            width: 2rem;
            height: 2rem;
            border-radius: 50%;
            background-color: rgba(40, 208, 148, 1);
            img{
                position: absolute;
                left: 50%;
                top: 50%;
                transform: translate(-50%,-50%);
            }
         }
        }
        &:last-of-type {
          margin-left: 1rem;
          margin-top: .5rem;
          p {
            &:first-of-type {
              font-family: "PingFangSC-Semibold", "PingFang SC Semibold",
                "PingFang SC";
              font-weight: 650;
              font-style: normal;
              font-size: 1.5rem;
              color: #2b3133;
              text-align: left;
              margin-bottom: 1rem;
            }
            &:last-of-type {
              font-family: "PingFangSC-Regular", "PingFang SC";
              font-weight: 400;
              font-style: normal;
              font-size: 1.2rem;
              color: #95a1a6;
              text-align: left;
            }
          }
        }
      }
    }
  }
}
</style>